package com.jee.support.io;

import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;


public class MorePlatformFileRead {
	public void read() throws IOException{
		/**
			File root = new File("/");
			File dir = new File(root, "etc");
			File child = new File(dir, "hosts");
			FileInputStream fis = new FileInputStream(child);
		*/

		//However, this still assumes that the root of the filesystem is named "/", which isn't likely to be a true on a non-Unix system. It's better to use the File.listRoots( ) method:
		File[] roots = File.listRoots();
		File dir = new File(roots[0], "etc");
		File child = new File(dir, "hosts");
		FileInputStream fis = new FileInputStream(child);
		/**
		 * Create a temporary file with the
		 */
		File.createTempFile("aa","aaa");
		/**
		 * Find the user's home directory with
		 */
		System.getProperty("user.home");
		/**
		 * Find the current working directory with
		 */
		System.getProperty("user.dir");
		 
	}
}
